package com.beigai.imessage.message.service;

import com.beigai.imessage.common.except.MessageException;
import com.beigai.imessage.message.dto.MRecReq;
import com.beigai.imessage.message.dto.MRecResp;
import com.beigai.imessage.message.dto.MSendReq;
import com.beigai.imessage.message.dto.MSendResp;

/**
 * Created by xxl on 2017/5/16.
 */
public interface MessageService {

    /**
     * 发送在线消息
     *
     * @param mSendReq
     * @return
     * @throws MessageException
     */
    MSendResp sendMessageOnline(MSendReq mSendReq) throws MessageException;

    /**
     * 发送离线消息
     *
     * @param mSendReq
     * @return
     */
    MSendResp sendMessageOffline(MSendReq mSendReq);

    /**
     * 接收在线消息
     *
     * @param mRecReq
     * @return
     */
    MRecResp receiveMessageOnline(MRecReq mRecReq);

    /**
     * 接收离线消息
     *
     * @param mRecReq
     * @return
     * @throws MessageException
     */
    MRecResp receiveMessageOffline(MRecReq mRecReq) throws MessageException;

}
